import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    { path: '/', name: 'HelloWorld', component: HelloWorld },
    { path: '/tool', name: 'tool', component: _ => { require(['@/view/tool.vue'], _) } },
    { path: '/videoParsing', name: 'videoParsing', component: _ => { require(['@/view/videoParsing.vue'], _) } },
    { path: '/timeline', name: 'timeline', component: _ => { require(['@/view/timeline.md'], _) } },
    { path: '/tree', name: 'tree', component: _ => { require(['@/view/tree.md'], _) } },
    { path: '/calendar', name: 'calendar', component: _ => { require(['@/view/calendar.md'], _) } },
    { path: '/sort', name: 'sort', component: _ => { require(['@/view/sort.md'], _) } }, // 排序
    { path: '/dnCache', name: 'dnCache', component: _ => { require(['@/view/dnCache.md'], _) } }, // 缓存
    { path: '/Queue', name: 'Queue', component: _ => { require(['@/view/suanfa/Queue.md'], _) } }, // 队列
    { path: '/PriorityQueue', name: 'PriorityQueue', component: _ => { require(['@/view/suanfa/PriorityQueue.md'], _) } }, // 优先队列
    { path: '/LinkedList', name: 'LinkedList', component: _ => { require(['@/view/suanfa/LinkedList.md'], _) } }, // 链表
    { path: '/DoublyLinkedList', name: 'DoublyLinkedList', component: _ => { require(['@/view/suanfa/DoublyLinkedList.md'], _) } }, // 双向链表
    { path: '/CircularLinkedList', name: 'CircularLinkedList', component: _ => { require(['@/view/suanfa/CircularLinkedList.md'], _) } }, // 循环链表
    { path: '/vueReader', name: 'vueReader', component: _ => { require(['@/view/blog/vueReaders.md'], _) } }, // vueReader
    { path: '/token', name: 'token', component: _ => { require(['@/view/blog/token.md'], _) } }, // token
    { path: '/localStorage', name: 'localStorage', component: _ => { require(['@/view/blog/localStorage.md'], _) } }, // localStorage
    { path: '/functions', name: 'functions', component: _ => { require(['@/view/blog/functions.md'], _) } }, // functions
  ]
})
